package com.zzy.demo.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * 
 * @author kaige
 *
 */
@Component("cms4ApplicationRunner")
@Slf4j
public class CmsApplicationRunner implements ApplicationRunner {
	
	private String host = "localhost";
	
	@Value("${server.port:8080}")
	private String port;
	
	@Value("${server.servlet.context-path:}")
	private String contextPath;

    @Override
    public void run(ApplicationArguments  var1) throws Exception{
		  log.info("---------启动成功,前后端分离首页: http://{}:{}{}",host,port,contextPath);
    }
}